<template>
    <view>
        <web-view :src="data.innerurl"></web-view>
    </view>
</template>

<script>
import { Job } from '../../model/job-model.js';
var job = new Job();
export default {
    data() {
        return {
            id: 0,
            title: '',
            tel: '',
            pid: 1,
            isgz: 0,
            title: '',

            data: {
                innerurl: ''
            }
        };
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (e) {
        this.onLoadClone3389(e);
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    /**
     * 生命周期函数--监听页面显示
     */
    onShow: function () {},
    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide: function () {},
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload: function () {},
    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh: function () {
        uni.showNavigationBarLoading();
        this.onLoadClone3389({});
    },
    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom: function () {},
    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {
        var that = this;
        return {
            title: that.title,
            path: '/pages/companydetail/index?id=' + that.id
        };
    },
    methods: {
        /**
         * 生命周期函数--监听页面加载
         */
        onLoadClone3389: function (e) {
            var that = this;
            if (that.id > 0) {
                var id = that.id;
            } else {
                var id = e.id;
                that.id = e.id;
            }
            var params = {
                id: that.id
            };
            job.getNavDetail((data) => {
                that.setData({
                    data: data.navinfo
                });
                uni.hideNavigationBarLoading(); //完成停止加载
                uni.stopPullDownRefresh();
            }, params);
        }
    }
};
</script>
<style>
/* pages/webview/index.wxss */
</style>
